

<?php if(!$profile['info']){?>
<div class="module clearfix">
<h2>LICENSE</h2>
	<div class="padding-bo
	<div class="padding-bottom margin-bottom  border-bottom">
	</div>

</div>
	
	<div class='alert alert-warning'>
		Opps! You are not allow to add license please fill up your
		profile....

		

	</div>

	<?php } else { ?>
<?php 
if($mode== "ADD"){

	?>
<div class="module clearfix">
	<h2><?= $profile['info']->title;?></h2>
	</div>
	<div>

		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					<span class="glyphicon glyphicon-random"></span>
					&nbsp;License Maintanence
				</h3>
			</div>
			<div class="panel-body">

				<div class="col-xs-9 clearfix">
					<input type="hidden" name="profile_id" value="<?= $profile_id; ?> ">
					
					<?php if($this->session->flashdata('message')) { 
						$show_message = $this->session->flashdata('message'); ?>
				<h5 class="login-text text-danger"><?= $show_message; ?> </h5>
				<?php } ?>
					<form class="form-horizontal" role="form" method="post"
						action="<?= base_url();?>member/license/submit_license">
						<div class="form-group">
							<label class="col-sm-3 control-label">State</label>
							<div class="col-sm-6">
							<small class="login_password-text text-danger">
							<?php echo form_error('location'); ?></small>
								<input type="institute" name="location" class="form-control"
									placeholder="State">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">License status</label>
							<div class="col-sm-4">
							<small class="login_password-text text-danger">
							<?php echo form_error('license_status'); ?></small>
								<input type="Subject" name="license_status" class="form-control"
									placeholder="License Status">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">Acquired</label>
							<div class="col-sm-4">
							<small class="login_password-text text-danger">
							<?php echo form_error('acquired'); ?></small>
								<input type="year" name="acquired" class="form-control"
									placeholder="Acquired">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-9">
								<button type="submit" class="btn btn-info">Add License</button>
								
								<!-- <a class="btn btn-success" href="<?= base_url();?>member/association">Next</a> -->
								
							</div>
						</div>
					</form>
				</div>

			</div>



			<table class="table table-hover">
				<?php if($license['details']){?>
				<thead>
					<tr>

						<th>State</th>
						<th>License status</th>
						<th>Acquired</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
				
					<?php foreach($license['details'] as $license):?>
					<tr>

						<td><?= $license->location;?></td>
						<td><?= $license->status;?></td>
						<td><?= $license->acquired;?></td>
						<th><a data-toggle="tooltip" title="Edit"  href="<?= base_url();?>member/license/edit/<?= $license->id;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
						
						
						<a data-toggle="tooltip" title="Delete" href="<?= base_url();?>member/license/delete/<?= $license->id;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-trash"></span></a></th>
						
						
					</tr>

					<?php endforeach;}else{?>
		
		<?php echo "<div class='alert alert-warning'>
  Opps! No License found....
</div>";}?>
				</tbody>
			</table>

			<div class="panel-body">

				<div class="col-xs-9 clearfix"></div>

			</div>

		</div>


	</div>
	<?php }?>
<?php }?>
<?php 
if($mode=="EDIT"){
	?>
	
	<div>

		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					<span class="glyphicon glyphicon-random"></span>
					&nbsp;License Maintanence
					<div class="badge pull-right"><a class="text text-success" href="<?= base_url();?>member/license">BACK</a></div>
				</h3>
				
			</div>
			<div class="panel-body">

				<div class="col-xs-9 clearfix">
					<?php if($this->session->flashdata('message')) { 
						$show_message = $this->session->flashdata('message'); ?>
				<h5 class="login-text text-danger"><?= $show_message; ?> </h5>
				<?php } ?>
					<form class="form-horizontal" role="form" method="post"
						action="<?= base_url();?>member/license/update_license">
						<div class="form-group">
							<label class="col-sm-3 control-label">State</label>
							<div class="col-sm-9">
							<small class="login_password-text text-danger">
							<?php echo form_error('institute'); ?></small>
								<input type="institute" name="location" class="form-control"
									value="<?= $license['info']->location;?>">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"> License status
							</label>
							<div class="col-sm-9">
							<small class="login_password-text text-danger">
							<?php echo form_error('major_subject'); ?></small>
								<input type="Subject" name="license_status" class="form-control"
									value="<?= $license['info']->status;?>">
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label">Acquired</label>
							<div class="col-sm-4">
							<small class="login_password-text text-danger">
							<?php echo form_error('year'); ?></small>
								<input type="year" name="acquired" class="form-control"
									value="<?= $license['info']->acquired;?>">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-9">
							<input type="hidden" name="id" value="<?= $license['info']->id;?>">
								<button type="submit" class="btn btn-info">Update License</button>
							</div>
						</div>
					</form>
				</div>

			</div>
			</div>
			</div>
			
	<?php }?>
	</div>